<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the increment component of this Timestamp</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mongodb-bson-timestamp.construct.html">« MongoDB\BSON\Timestamp::__construct</a></li>
      <li style="float: right;"><a href="mongodb-bson-timestamp.gettimestamp.html">MongoDB\BSON\Timestamp::getTimestamp »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.mongodb-bson-timestamp.html">MongoDB\BSON\Timestamp</a></li>
    <li>Returns the increment component of this Timestamp</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mongodb-bson-timestamp.getincrement" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB\BSON\Timestamp::getIncrement</h1>
  <p class="verinfo">(mongodb &gt;=1.3.0)</p><p class="refpurpose"><span class="refname">MongoDB\BSON\Timestamp::getIncrement</span> &mdash; <span class="dc-title">Returns the increment component of this Timestamp</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongodb-bson-timestamp.getincrement-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><strong>MongoDB\BSON\Timestamp::getIncrement</strong></span>(): <span class="type">int</span></div>

  <p class="para rdfs-comment">
   The increment component of a Timestamp is its least significant 32 bits,
   whichs denotes the incrementing ordinal for operations within a given second.
   This value is read as an unsigned 32-bit integer with big-endian byte order.
  </p>
  
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <span class="simpara">
    Because PHP&#039;s integer type is signed, some values returned by this
    method may appear as negative integers on 32-bit platforms. The
    <code class="literal">&quot;%u&quot;</code> formatter of <span class="function"><a href="function.sprintf.html" class="function">sprintf()</a></span> may be
    used to obtain a string representation of the unsigned decimal value.
   </span>
  </p></blockquote>

 </div>


 <div class="refsect1 parameters" id="refsect1-mongodb-bson-timestamp.getincrement-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongodb-bson-timestamp.getincrement-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the increment component of this Timestamp.
  </p>
  <div class="warning"><strong class="warning">警告</strong>
   <p class="simpara">
    On 32-bit systems this method may return a negative number. Although the
    increment and timestamp parts of the BSON timestamp type consists of two
    unsigned 32-bit values, PHP can not represent these on 32-bit platforms.
   </p>
  </div>
 </div>


 <div class="refsect1 errors" id="refsect1-mongodb-bson-timestamp.getincrement-errors">
  <h3 class="title">错误／异常</h3>
  <ul class="simplelist">
   <li class="member">Throws <span class="classname"><a href="class.mongodb-driver-exception-invalidargumentexception.html" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a></span> on argument parsing errors.</li>
  </ul>
 </div>


 <div class="refsect1 seealso" id="refsect1-mongodb-bson-timestamp.getincrement-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><a href="https://www.mongodb.com/docs/manual/reference/bson-types/#timestamps" class="link external">&raquo;&nbsp;BSON Types: Timestamps</a></li>
  </ul>
 </div>


</div></div></div></body></html>